/// 菜单数据
class MenuBean {
  String title;
  List<Datum> data;

  MenuBean({
    required this.title,
    required this.data,
  });

  factory MenuBean.fromJson(Map<String, dynamic> json) => MenuBean(
        title: json["title"],
        data: List<Datum>.from(json["data"].map((x) => Datum.fromJson(x))),
      );

  Map<String, dynamic> toJson() => {
        "title": title,
        "data": List<dynamic>.from(data.map((x) => x.toJson())),
      };
}

class Datum {
  String? name;
  String? icon;
  String? link;
  bool? edit;
  String? tag;

  Datum({this.name, this.icon, this.link, this.edit, this.tag});

  factory Datum.fromJson(Map<String, dynamic> json) => Datum(
        name: json["name"],
        icon: json["icon"],
        link: json["link"],
        edit: json["edit"],
        tag: json["tag"],
      );

  Map<String, dynamic> toJson() => {
        "name": name,
        "icon": icon,
        "link": link,
        "edit": edit,
        "tag": tag,
      };
}
